package com.atjg.autocat.utils

import com.blankj.utilcode.util.GsonUtils
import com.blankj.utilcode.util.SPUtils
import com.google.gson.Gson
import com.zhy.baselibrary.utils.Klog

class ConfigUtils {
    companion object {
        fun <T> query(key: String): T? {
            val config = SPUtils.getInstance().getString("config")
            if (!config.isNullOrEmpty()) {
                val configJson = Gson().fromJson(config, HashMap::class.java)
                val data = configJson[key] as T
                return data
            } else {
                return null
            }
        }
    }
}